1. Field of the Invention
The present invention relates to a method for efficient generation of a polyhedron, an apparatus thereof and a storage medium for storing the method, land an image processing method for displaying a polyhedron, an image processing apparatus thereof and a storage medium for storing the method.
2. Related Background Art
It is already well known that a color is constituted by three attributes (luminosity, hue and saturation). For representing such three attributes in a three-dimensional Euclidean space by assigning these attributes to mutually orthogonal coordinates, there are widely utilized an RGB color space and an XYZ color space.
Among various color spaces, there are known so-called uniform perception color spaces for correlating the color difference with the spatial distance. Among these, the CIE1976-Lab space (hereinafter simply called Lab color space) is frequently utilized for analyzing the mapping state of colors or the color reproduction area of various color devices. For such analysis of the mapping state of colors or the color reproduction area of a color device, it is necessary to measure or calculate the color (Lab value) outputted by the color device and to plot such value in the Lab space. The term plotting means inscribing data in a graph. In a case of plotting data consisting of two variables, such data can be recorded as coordinate points in a plane represented for example by XY coordinates, but, in a case where each point is represented in a three-dimensional space, there should be utilized a three-dimensional (3-D) rendering function.
The 3-D rendering system is to represent a spatial object in a pseudo manner with a two-dimensional image, by generating an image projected onto a projection plane through a predetermined position of observation. There are often included additional functions such as the image rotation, enlargement and reduction in order to enable more detailed observation to the user. It is already known to utilize these functions for visualizing the data of the colors present in the color space.
There are already known various 3-D rendering systems for providing the above-mentioned 3-D rendering function. In some systems, the normal vectors of the triangular polygons to be drawn have to be made to mutually coincide for the face hiding process.
However, there has not been disclosed, on the polyhedron composed of triangular polygons etc., the method of automatic coincidence of the normal vectors of such polygons. For this reason, it has been impossible, in the 3-D rendering system in which the normal vectors of the triangular polygons are to be drawn for the face hiding process, to draw the polygons with unmatched normal vectors.
In the following there will be explained, with reference to FIGS. 9A and 9B, the relationship between the order of three vertices of a triangular polygon to be registered and the direction of the normal vector of such triangular vector.
The normal vector of a triangular polygon can be uniquely defined in its length, but the direction thereof has to be clearly defined according to the necessity. Therefore, the direction of such normal vector is defined as the advancing direction of a right-handed screw rotating along the order of the registered vertices. Therefore, for a triangular polygon registered in the clockwise direction in the order of 04xe2x86x9219xe2x86x9205, the normal vector is directed to the rear side of the drawing, same as the advancing direction of a clockwise rotating right-handed screw. On the other hand, for a triangular polygon registered in the counterclockwise direction in the order of 04xe2x86x9211xe2x86x9205, the normal vector is directed to the front side of the drawing, the same as the advancing direction of a counterclockwise rotating right-handed screw. From this example it will be understood that the normal vectors do not mutually coincide for the triangular polygon registered in the order of 04xe2x86x9219xe2x86x9205 and that registered in the order of 04xe2x86x9211xe2x86x9205.
Also in such system, in displaying triangular polygons with unmatched normal vectors, there may result a drawback that a triangular polygon to be displayed is not displayed.
An object of the present invention is to provide a polyhedron generating method capable of automatically changing the normal vectors, indicating polygons constituting a polyhedron, in such a manner that they satisfy a predetermined condition.
The above-mentioned object can be attained, according to a first invention of the present application, by a method for generating a polyhedron which envelops la sequence of points present in a coordinate space, the method comprising:
a polygon data generating step for generating polygon data indicting polygons constituting the polyhedron, based on the sequence of points present in the coordinate space; and
a changing step for changing the polygon data in such a manner that the normal vectors of the polygon data satisfy a predetermined condition.
Another object of the present invention is to enable rapid generation of a polyhedron which envelopes a sequence of points present in a coordinate space.
The above-mentioned object can be attained, according to a second invention of the present application, by a method of generating a polyhedron which envelopes a sequence of points present in a coordinate space, the method comprising steps of entering a data group indicating a sequence of points present in the coordinate space, generating an N-hedron based on the data group and generating polygons constituting the polyhedron based on the data belonging to the surface of the N-hedron among the entered data group.
Also according to a third invention of the present application, there is provided a method of generating a polyhedron which envelopes a sequence of points present in a coordinate space, the method comprising plural polyhedron generating algorithms and comprising steps of entering a data group indicating a sequence of points present in the coordinate space and provided with a tag, selecting a polyhedron generating algorithm corresponding to the tag among such plural polyhedron generating algorithms, and generating polygons constituting the polyhedron from the data group utilizing the thus selected polyhedron generating algorithm.